#include <stdio.h>

int AddtoTop(int top)
{
    int i = 0;
    int res = 0;
    for(i = 0;i <= top;i++)
    {
        res += i;
    }
    return res;
}

int main()
{
    int top = 100;
    int result = AddtoTop(top);

    printf("result:%d\n",result);

    return 0;
}
